import request from '@/utils/request'
export function addClassiFication(data) {
  return request({
    url: '/wcanyin_admin/manage/addSellClassify',
    method: 'post',
    data: data
  })
}
export function searchClassiFication(pageNum, pageSize, id) {
  return request({
    url: `/wcanyin_admin/manage/queryClassifyPage`,
    method: 'get',
    params: { pageNum: pageNum, pageSize: pageSize, shopId: id }
  })
}
export function searAllchClassiFication(id) {
  return request({
    url: `/wcanyin_admin/manage/queryClassifyPage`,
    method: 'get',
    params: { shopId: id, pageSize: 99999 }
  })
}
export function searchAttributes(id) {
  return request({
    url: `/wcanyin_admin/manage/queryAttrList`,
    method: 'get',
    params: { shopId: id }
  })
}
export function searchGoodsList(pageNum, pageSize, id) {
  return request({
    url: `/wcanyin_admin/manage/queryItemPage`,
    method: 'get',
    params: { pageNum: pageNum, pageSize: pageSize, shopId: id }
  })
}
export function updateClassiFication(data) {
  return request({
    url: '/wcanyin_admin/manage/updateSellClassify',
    method: 'post',
    data: data
  })
}
export function addAttributes(data) {
  return request({
    url: '/wcanyin_admin/manage/addAttr',
    method: 'post',
    data: data
  })
}
export function addGoods(data) {
  return request({
    url: '/wcanyin_admin/manage/addItem',
    method: 'post',
    data: data
  })
}
export function updateAttributes(data) {
  return request({
    url: '/wcanyin_admin/manage/updateAttr',
    method: 'post',
    data: data
  })
}
export function updateGoods(data) {
  return request({
    url: '/wcanyin_admin/manage/updateItem',
    method: 'post',
    data: data
  })
}
export function deleteClassiFication(data) {
  return request({
    url: '/wcanyin_admin/manage/deleteClassify',
    method: 'post',
    data: data
  })
}
export function deleteAttributes(data) {
  return request({
    url: '/wcanyin_admin/manage/deleteAttr',
    method: 'post',
    data: data
  })
}
export function updateGoodsStatus(data) {
  return request({
    url: '/wcanyin_admin/manage/updateItemStauts',
    method: 'post',
    data: data
  })
}
export function searchClassiFicationByName(name, shopId) {
  return request({
    url: '/wcanyin_admin/manage/queryClassifyPage',
    method: 'get',
    params: { name: name, shopId: shopId }
  })
}
export function searchGoodsByName(name, shopId) {
  return request({
    url: '/wcanyin_admin/manage/queryItemPage',
    method: 'get',
    params: { name: name, shopId: shopId }
  })
}
export function searchGoodsByOne(data) {
  return request({
    url: '/wcanyin_admin/manage/queryItem',
    method: 'get',
    params: data
  })
}
export function queryFreeList(query) {
  return request({
    url: '/wcanyin_admin/manage/queryItemPage',
    method: 'get',
    params: query
  })
}
export function copyMenu(data) {
  return request({
    url: '/wcanyin_admin/manage/copyMenu',
    method: 'post',
    data: data
  })
}
